package com.classnet.util;

/**
 *
 * @author karltinawi
 * @version 1.0
 */
public abstract class CnetResult {
    
    private int result;
    private String description;
    
    public CnetResult(int result, String description) {
        setResult(result);
        setDescription(description);
    }
    
    private void setResult(int res) {
        result = res;
    }

    private void setDescription(String des) {
        description = des;
    }
    
    public int getResult() {
        return result;
    }
    
    public String getDescription() {
        return description;
    }
    
    public abstract String getResultValue();
    
    @Override
    public String toString() {
        String out = getResultValue();
        if(description != null) out += ": " + description;
        return out;
    }
}